import { pubRequire } from '@utils/public'
const baseUrl = '/homes/reviews'
const homUrl = '/homes'
// 获取列表
export function getSearchList(params, callBack, errBack) {
  return pubRequire('get', `${baseUrl}/contents`, params, callBack, errBack)
}
// 通过单个
export function passSingleAPI(id, callBack, errBack) {
  return pubRequire(
    'put',
    `${homUrl}/${id}/reviews/contents/pass`,
    '',
    callBack,
    errBack
  )
}
// 通过多个
export function passMultAPI(params, callBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl}/contents/pass`,
    params,
    callBack,
    errBack
  )
}
// 不通过单个
export function failSingleRequestAPI(id, params, callBack, errBack) {
  return pubRequire(
    'put',
    `${homUrl}/${id}/reviews/contents/unpass`,
    params,
    callBack,
    errBack
  )
}
// 不通过多个
export function failMultRequestAPI(params, callBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl}/contents/unpass`,
    params,
    callBack,
    errBack
  )
}
// 删除单个
export function deleteRequestAPI(id, params, callBack, errBack) {
  return pubRequire(
    'delete',
    `${homUrl}/${id}/reviews/contents`,
    params,
    callBack,
    errBack
  )
}
// 异步获取作业数量
export function ansyCountAPI(params, callBack, errBack) {
  return pubRequire('get', `${baseUrl}/ansy-count`, params, callBack, errBack)
}
